import base from '@/api/baseurl';
import request from '@/utils/request'

export function findCurve(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/tfpr/findCurve',
    method: 'get',
    params: query
  })
}

//单行删除
export function deleteParamterszi(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/atigs/delEnterTheParameter',
    method: 'get',
    params: query
  })
}


export function addCurve(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/tfpr/addCurve',
    method: 'post',
    data
  })
}

export function updateParamterszi(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/atigs/updateConfiguration',
    method: 'post',
    data
  })
}

/**
 * 获取转移曲线编号options
 * @param {*} query 
 * @returns   "cv_code": "2021111802", "cv_name": "境内FTP转移收益率曲线"
 */
export function findCvCode(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/tfpr/findCvCode',
    method: 'get',
    params: query
  })
}

/**
 * 获取转移曲线编号对应表单参数
 * @param {*} query  cv_code  s_date  e_date
 * @returns   
 */
 export function findTremCode(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/tfpr/findTremCode',
    method: 'get',
    params: query
  })
}



/**
 * 获取转移曲线编号对应表单参数的单位
 * @param {*} query  cv_code  s_date  e_date
 * @returns   
 */
 export function findUile(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/tfpr/findUile',
    method: 'get',
    params: query
  })
}
/**
 * 子表修改
 */
 export function updateCurve(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/tfpr/updateCurve',
    method: 'post',
    data
  })
}
/**
 * 子表删除
 */
 export function delCurve(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/tfpr/delCurve',
    method: 'get',
    params: query
  })
}